<% if (session.getAttribute("username") == null) {%>
<form action="login" method="POST">
    <h1>Login here</h1>

    <table border="0">
        <tbody>
            <tr>
                <td><label>UserName</label></td>
            </tr>
            <tr>
                <td><input type="text" name="username" id="username" value=""/></td>
            </tr>
            <tr>
                <td><label>Password</label></td>
            </tr>
            <tr>
                <td><input type="password" name="password" id="password" value=""/></td>
            </tr>
            <tr>
                <td><input type="submit" name="action" id="btLogin" value="Login"/><span id="lgmsg">${Error}</span></td>
            </tr>
        </tbody>
    </table>
</form>
<%} else {
%>
<table border="0">
    <tbody>
        <tr>
            <td><label>Welcome</label></td>
        </tr>
        <tr>
            <td><%=session.getAttribute("Name").toString()%></td>
        </tr>
        <tr>
            <td><a href="controlertuan?action=myprofile&username=<%=session.getAttribute("username").toString()%>">My Profile</a></td>
        </tr>
        <tr>
            <td><a href="#">View History</a></td>
        </tr>
        <tr>
            <td><a href="TriController?action=ViewRegistryContest">My Contest</a></td>
        </tr>
        <tr>
        <td><a href="TriController?action=ViewImage&idContest=1">Image Contest</a></td>
        </tr>
        <tr>
            <td><a href="TriController?action=ViewMyVote&txtUsername=<%=session.getAttribute("username")%>idContest=1">Votes Static</a></td>
        </tr>
        <tr>
            <td><a href="logout">Logout</a></td>
        </tr>
    </tbody>
</table>
<%
            }
%>